import type { FormInstance, FormRules } from 'element-plus'
import { ref } from 'vue'

let rules = ref<FormRules>({
  // 用户名
  name: [
    { required: true, message: '请输入用户名', trigger: 'blur' },
    { min: 2, max: 15, message: '长度在 3 到 15 个字符', trigger: 'blur' }
  ],
  certificatesType: {
    required: true,
    message: '请选择证件类型',
    trigger: 'change'
  },
  certificatesNo: {
    required: true,
    message: '请填写证件号码',
    trigger: 'change'
  },
  sex: {
    required: true,
    message: '请选择性别',
    trigger: 'change'
  },
  birthdate: {
    required: true,
    message: '请选择出生日期',
    trigger: 'change'
  },
  phone: {
    required: true,
    message: '请填写手机号码',
    trigger: 'change'
  },
  isMarry: {
    required: true,
    message: '请选择婚姻状况',
    trigger: 'change'
  },
  isInsure: {
    required: true,
    message: '请选择付费方式',
    trigger: 'change'
  },
  address: {
    required: true,
    message: '请输入详细住址',
    trigger: 'change'
  },
  contactsCertificatesType: {
    required: true,
    message: '请选择联系人证件类型',
    trigger: 'change'
  },
  contactsPhone: {
    required: true,
    message: '请填写联系人手机号码',
    trigger: 'change'
  },

})

export default rules
